package com.xw.service.sysconfig;

import com.xw.model.User;
import com.xw.service.common.BaseService;
import com.xw.vo.UserVo;

import java.util.List;
import java.util.Map;

public interface UserService extends BaseService<User> {
    /**
     * 根据条件动态查询用户并带有分页
     * @param user
     * @return
     */
    List<UserVo> findByWhere(UserVo user);

    /**
     * 添加系统管理员
     * @param user
     * @return
     */
    Map add(User user);

    /**
     * 批量删除
     * @param userIds
     * @return
     */
    Map dels(String... userIds);

    /**
     * 判断手机号是否存在
     * @param phone
     * @return
     */
    Map<String, Object> phoneIsExist(String phone);

    /**
     * 验证码登录
     * @param phone
     * @param vcId
     * @param codeNum
     * @return
     */
    Map<String, Object> loginByCode(String phone, String vcId, String codeNum);

    /**
     * 注册
     * @param phone
     * @param vcId
     * @param codeNum
     * @param pwd
     * @param againPwd
     * @return
     */
    Map<String, Object> registerByPhoneAndCode(String phone, String vcId, String codeNum, String pwd, String againPwd);

    /**
     * 找回密码
     * @param phone
     * @param vcId
     * @param codeNum
     * @param pwd
     * @param againPwd
     * @return
     */
    Map<String, Object> findPwd(String phone, String vcId, String codeNum, String pwd, String againPwd);

    /**
     * 手机密码登录
     * @param phone
     * @param pwd
     * @return
     */
    Map<String, Object> loginByPwd(String phone, String pwd);

    Map<String, Object> findUserByUserId(String userId);

    Map joinBlack(String userId);

    Map removeJoinBlack(String userId);

    Map<String, Object> updateUserByUserId(String userId, String userImg, String userNickName);

    Map<String, Object> updateGenderByUiId(String userId, Integer gender);

    Map makeTeacher(String userId,String userDesc);

    Map dismissTeacher(String userId);

    Map cashOutBalance(String userId, Double newBalance ,Double oldCashOut);

    Map<String, Object> loginByWX(String userPhone, String userNickName, String userImg);
}
